<template>
  <div></div>
</template>

<script>
import NProgress from 'nprogress';
NProgress.configure({ showSpinner: false });

export default {
  name: 'sso',
  mounted() {
    NProgress.start();

    const token = this.$store.getters.token;
    const { redirect_uri } = this.$route.query;
    if (!token || !redirect_uri) return this.$router.push({ name: 'login', replace: true });
    window.location.href = `${redirect_uri}?token=${token}`;
  }
}
</script>
